﻿@model Whatsnexx.Models.WhatsnexxSettingsPart

<fieldset>
    <legend>@T("Whatsnexx")</legend>
    <div>
        <label for="@Html.FieldIdFor(m => m.TicketBusUrl)">@T("Ticket Bus Url")</label>
         @Html.TextBoxFor(m => m.TicketBusUrl, new { @class = "textMedium" })
        <span class="hint">@T("Leave blank for default Ticket Bus Url value.")</span>
        <span class="hint">@T("https://ticketbus.whatsnexx.com")</span>
        @Html.ValidationMessage("TicketBusUrl", "*") 
    </div>
    <div>
        <label for="@Html.FieldIdFor(m => m.AccountId)">@T("Account Id")</label>
        @Html.TextBoxFor(m => m.AccountId, new { @class = "textMedium" })
        <span class="Whatsnexxhelps"></span>
        <span>@T("Please enter account GUID")</span>
        @Html.ValidationMessage("AccountId", "*")
    </div>
    <div>
        <label for="@Html.FieldIdFor(m => m.UserName)">@T("Username")</label>
        @Html.TextBoxFor(m => m.UserName, new { @class = "textMedium" })
        <span class="Whatsnexxhelps"></span>
        <span>@T("Please enter Ticket Bus user name")</span>
        @Html.ValidationMessage("UserName", "*")
    </div>
    <div>
        <label for="@Html.FieldIdFor(m => m.Password)">@T("Key")</label>
        @Html.PasswordFor(m => m.Password, new { @class = "textMedium" })
        <span class="Whatsnexxhelps"></span>
        <span>@T("Please enter Ticket Bus key")</span>
        @Html.ValidationMessage("Password", "*")
    </div>
</fieldset>



@{
    Style.Require("AdminWhatsnexx");
    Style.Require("AdminHelptooltip"); 
}


@using (Script.Foot())
{
    <script type="text/javascript">
    //<![CDATA[
        (function ($) {
            $(document).ready(function () {
                $(".Whatsnexxhelps").helptooltip();
            });

            $.fn.helptooltip = function () {
                $("body").append('<div id="Whatsnexxbubble_tooltip" style="display: none; left: 379px; top: 62px;"><div class="Whatsnexxbubble_top"></div><div class="Whatsnexxbubble_middle"><span id="Whatsnexxbubble_tooltip_content">&nbsp;</span></div><div class="Whatsnexxbubble_bottom"></div></div>');
                $(this).each(function () {
                    var ht = $(this).next('span').html();
                    $(this).next('span').html('&nbsp;&nbsp;&nbsp;<img onmouseout="$(\'#Whatsnexxbubble_tooltip\').hide();" onmouseover="Whatsnexxshowme(\'' + ht + '\', this);" src="@Url.Content("~/Modules/Whatsnexx/Styles/images/b_tipp.gif")" alt="" />').show();
                });
            }
        })(jQuery);

        function Whatsnexxshowme(txt, me) {
            jQuery("#Whatsnexxbubble_tooltip_content").html(txt);
            jQuery("#Whatsnexxbubble_tooltip").css({ display: 'block', top: jQuery(me).offset().top - jQuery("#Whatsnexxbubble_tooltip").height() + 5, left: jQuery(me).offset().left - (jQuery("#Whatsnexxbubble_tooltip").width() - 50) });
        }

	//]]>
    </script>
    
}
      